<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width = device-width ,initial-scale = 1,minimum-scale = 1,maximum-scale = 1,user-scalable =no,"/>
	<title>我的权限 - {$maccms.site_name}</title>
	{include file="user/include" /}
</head>

<body style="background: #fff;">
<!--子页顶部-->
<div class="zy-search zy-tit">
	<div class="sch-w clearfix">
		<a class="go-back" href="#"><img src="{$maccms.path_tpl}images/user/go-back.png"></a>
		<div class="tit">
			我的权限
		</div>
	</div>
</div>

<div class="wrap list-top" style="border-top: 1px solid #ececec;">
	<span class="ml10">会员组：{$obj.group.group_name} 期限：{if condition="$obj.group_id lt 3"}无限期{else} {$obj.user_end_time|mac_day}{/if}</span>
</div>
<div class="wrap" id="list">
	<!--我的收藏-->
	<div class="order-list often-odr">
		{volist name="type_tree" id="vo"}
		<div class="item clearfix">
			<h3>{$vo.type_name}</h3>
			{foreach name="$vo.popedom" id="v2"}
				{$key}=> {if condition="$v2 eq 1"}√{else}×{/if}
			{/foreach}
			<br>
			{volist name="vo.child" id="child"}
			<h3>{$child.type_name}</h3>
				{foreach name="$child.popedom" id="v2"}
				{$key}=> {if condition="$v2 eq 1"}√{else}×{/if}
				{/foreach}
				<br>
			{/volist}
		</div>
		{/volist}
	</div>
</div>


<!--loading start-->
<div class="loading_box"></div>
<!--loading end-->

<script>

	$(".go-back").click(function () {
		var ref = document.referrer;
		location.href=ref;
	});

	$('.btn-del').click(function(){
		var that=$(this);
		if(confirm('确定要删除吗')) {
			$.ajax({
				url: "{:url('user/del')}",
				type: "post",
				dataType: "json",
				data: {ids: that.attr('data-id'), 'type': 2},
				beforeSend: function () {
				},
				success: function (r) {
					alert(r.msg);
					if (r.code == 1) {
						that.parent().parent().remove();
					}
				},
				complete: function () {

				}
			});
		}
	});

</script>
</body>
</html>